package exogwt.server.jcr.url;

import org.exoplatform.services.jcr.RepositoryService;

import java.net.URLStreamHandler;
import java.net.URLConnection;
import java.net.URL;
import java.io.IOException;

public class JcrURLStreamHandler extends URLStreamHandler {
    private RepositoryService repositoryService;

    public JcrURLStreamHandler(RepositoryService repositoryService) {
        this.repositoryService = repositoryService;
    }

    protected URLConnection openConnection(URL u) throws IOException {
        return new JcrUrlConnection(u, repositoryService);
    }
}
